package cn.itcast.crm.service;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.hibernate.annotations.Columns;

import cn.itcast.crm.domain.Customer;

public interface CustomerService {
	//已经关联到指定区的客户列表
	@GET
	@Path("/findFiexedAreaCustomer/{fixedareaid}")
	@Produces({"application/xml","application/json"})
	public List<Customer> findFiexedAreaCustomer(
			@PathParam("fixedareaid") String fixedAreaId);
	
	//查询为关联的客户列表
	@GET
	@Path("/noFindNoCustomer")
	@Produces({"application/xml","application/json"})
	public List<Customer> findNoCustomer();
	
	//将客户关联到定区上,将定区客户id拼成1,2.3
	@PUT
	@Path("/CustomerToFixedArea")
	public void CustomerToFixedArea(@QueryParam("customerIdStr") String customerIdStr,
		@QueryParam("fixedAreaId")	String fixedAreaId);
	//添加注册用户
	
	@POST
	@Path("/customer")
	@Consumes({"application/xml","application/json"})
	public void regist(Customer customer);
	
	//查询用户
	@GET
	@Path("/customer/telephone/{telephone}")
	@Consumes({"application/xml","application/json"})
	public Customer findByTelephone(@PathParam("telephone") String telephone);
	
	@GET
	@Path("/customer/updataTelephone/{telephone}")
	public void updataType(@PathParam("telephone") String telephone);
	
	//用户登录
	@GET
	@Path("/customer/login")
	@Consumes({"application/xml","application/json"})
	public Customer login(@QueryParam("telephone") String telephone,@QueryParam("password") String password);
	
	@GET
	@Path("/findFixedAreaByAddress")
	@Consumes({"application/xml","application/json"})
	public String findFixedAreaByAddress(@QueryParam("address") String address);
}
